﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:Charts="clr-namespace:Visifire.Charts;assembly=WPFVisifire.Charts"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" x:Class="CodeGears.WorkItemTracking.ChartingDashboard.ChartView"
    Height="400" Width="700" BorderThickness="0" Margin="5" mc:Ignorable="d">
	<UserControl.BorderBrush>
		<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
			<GradientStop Color="#FF759A00" Offset="0.534"/>
			<GradientStop Color="#FF394B00"/>
		</LinearGradientBrush>
	</UserControl.BorderBrush>
    <Canvas>
        <Expander Header="Chart options" Panel.ZIndex="1">
            <WrapPanel Width="700">
                <Label Foreground="White" Content="Projects:"/>
                <ComboBox x:Name="cmbProjects" Width="90" Height="24"
						ItemsSource="{Binding Projects}"
						SelectedItem="{Binding SelectedProject, Mode=TwoWay}" d:LayoutOverrides="Width, HorizontalMargin"/>
                <Label Foreground="White" Content="Queries:"/>
                <ComboBox x:Name="cmbQuery" Width="100" Height="24"
						ItemsSource="{Binding Queries}"
						SelectedItem="{Binding SelectedQuery, Mode=TwoWay}" d:LayoutOverrides="Width"/>
                <Label Foreground="White" Content="Group by:"/>
                <ComboBox x:Name="cmbField" Width="100" Height="24"
						ItemsSource="{Binding Fields}"
						SelectedItem="{Binding SelectedField, Mode=TwoWay}" d:LayoutOverrides="Width"/>
                <Label Foreground="White" Content="Chart type:"/>
                <ComboBox x:Name="cmbChartType" Width="80" Height="24"
						ItemsSource="{Binding ChartTypes}"
						SelectedItem="{Binding SelectedChartType, Mode=TwoWay}" d:LayoutOverrides="Width, HorizontalMargin"/>
                <Button Command="{Binding UpdateChartCommand}" Height="26" Width="80" Content="Update chart" Margin="4,0,0,0" d:LayoutOverrides="Width" />
            </WrapPanel>
        </Expander>
        <Charts:Chart x:Name="ChartArea" Background="{x:Null}" Width="700" d:LayoutOverrides="HorizontalAlignment, HorizontalMargin" Height="400"/>
	</Canvas>
</UserControl>
